package com.jomoo.css.common.util.service;

import com.jomoo.css.common.util.annotation.Audit;
import com.jomoo.css.common.util.domain.EntityBase;
import org.springframework.scheduling.annotation.Async;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 实体[DataAudit] 服务对象接口
 */
public interface SYSDataAuditService {
    @Async("asyncExecutor")
    void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields, String entityLogicName, String entityClassSimpleName, String actionName);
    @Async("asyncExecutor")
    void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields, String entityLogicName, String entityClassSimpleName, String actionName);
    @Async("asyncExecutor")
    void removeAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields, String entityLogicName, String entityClassSimpleName, String actionName);
    @Async("asyncExecutor")
    void deActionAudit(HttpServletRequest request, EntityBase entity, Object idValue, String deActionName, String entityLogicName, String entityClassSimpleName);
    @Async("asyncExecutor")
    void uploadFileAudit(HttpServletRequest request, EntityBase entity, Object idValue, String deActionName, String fileType, String fileInfo, int total, int success, int error, int skip);
}